package com.example.demo.service;

import com.example.demo.entity.Forward;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 转发文章表 服务类
 * </p>
 *
 * @author Mr.Xiayh
 * @since 2024-06-05
 */
public interface IForwardService extends IService<Forward> {
    //获取转发量
    int countForwardByUserAndArticle(Integer articleId);

    //添加转发表
    boolean addForward(Forward forward);

    //通过文章id获取文章内容
    String getForwardContent(Integer articleId);

    //通过文章id获取文章作者id
    Integer getForwardUserIdByArticleId(Integer articleId);

    //通过用户id获取文章id
    List<Integer> getForwardArticleIdByUserId(Integer userId);
}
